package com.wwz.controller;

import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter;

@Slf4j
@RefreshScope
@RestController
public class ConfigClientController {

   @Value("${my.username}")
    private String username;

   @Value("${my.password}")
   private String password;

   @GetMapping("user")
    public String User(){
       log.info("进入了user方法");
       return "用户"+username+","+"密码"+password;
   }
}
